import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @Author: YCKOKO
 * @Date: 2023-05-05
 * @Time:16:22
 * @Description:
 */
public class day35 {
    public static void main2(String[] args) {
        Scanner sacn = new Scanner(System.in);
        int n = sacn.nextInt();
        int count1 = 1; //count1为情况总数
        for (int i = n; i >= 1 ; i--) {
            count1 *= i;
        }
        int[] nums =  new int[n+1];
        int count2 = 0; //count2为有效情况总数
        for (int i = 1; i < nums.length; i++) {
            int m = 1; // m为分母
            for (int j = i; j >= 1 ; j--) {
                m *= j;
            }
            int z = 1; // z为分子
            int temp = n;
            for (int j = i; j >= 1 ; j--) {
                z *= temp;
                temp -= 1;
            }
            nums[i] = z / m;
        }
        for (int i = 1; i < nums.length; i++) {
            count2 += nums[i];
        }
        count2 -= nums[n-1];
        int count3 = count1 - count2;
        double ret = (count3*100) / count1;
        System.out.printf("%.2f",ret);
        System.out.println("%");
    }


    public static void main1(String[] args) {
        Scanner sacn = new Scanner(System.in);
        while(sacn.hasNext()){
            String names = sacn.nextLine();
            String name  = sacn.nextLine();
            Set<String> s = new HashSet<>();
            int end = 0;
            for (int i = 0; i < names.length(); ) {
                if('\"' == names.charAt(i)){
                    end = names.indexOf('\"',i+1);
                    s.add(names.substring(i+1,end));
                    i = end + 2;
                }else {
                    end = names.indexOf(',',i+1);
                    if(-1 == end){
                        s.add(names.substring(i,names.length()));
                        break;
                    }
                    s.add(names.substring(i,end));
                    i = end + 1;
                }
            }
            if(s.contains(name)){
                System.out.println("Ignore");
            }else{
                System.out.println("Important!");
            }
        }
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long d[] = new long[21]; // 错排数据
        d[0] = d[1] = 0;
        d[2] = 1;
        long f[] = new long[21]; // 阶乘
        f[0] = f[1] = 1;
        f[2] = 2;
        // 算N错排数据和阶乘
        for(int i = 3; i <= 20; ++i){
            d[i] = (i-1) * (d[i-1] + d[i-2]);
            f[i] = i * f[i-1];
        }
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            double ret = d[n] * 100.00 / f[n];
            String temp = String.format("%.2f",ret);
            System.out.println(temp+"%");
        }
    }

    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        long[] dp = new long[21];
        dp[1] = 0;
        dp[2] = 1;
        for (int i = 3; i < dp.length; i++) {
            dp[i] = (i - 1) * (dp[i - 1] + dp[i - 2]);
        }
        while (scan.hasNext()) {
            int n = scan.nextInt();
            long count = 1;
            for (int i = 1; i <= n; i++) {
                count *= i;
            }
            double ret = dp[n] * 100.00 / count;
            String temp = String.format("%.2f", ret);
            System.out.println(temp + "%");
        }
    }

}
